package com.haixiaoke.saas.enterprise.messageCenter.controller;

import com.haixiaoke.saas.common.annotation.TenantScope;
import com.haixiaoke.saas.common.core.domain.AjaxResult;
import com.haixiaoke.saas.common.tenant.TenantContext;
import com.haixiaoke.saas.messageCenter.service.IMessageChannelService;
import com.haixiaoke.saas.system.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 机构消息渠道信息Controller
 *
 * @author xiaolong
 * @date 2024-11-08
 */
@RestController
@RequestMapping("/enterprise/messageCenter/channel")
public class EnterpriseMessageChannelController extends BaseController {
    @Autowired
    private IMessageChannelService messageChannelService;

    /**
     * 根据机构id获取机构消息渠道详细信息
     */
    @GetMapping(value = "/byTenantId")
    @TenantScope
    public AjaxResult getInfoByTenantId() {
        return success(messageChannelService.getInfoByTenantId(TenantContext.getTenantId()));
    }

}
